using System;
using System.Collections.Generic;
using System.Text;
using DTO;
using DAO;
using System.Data.SqlClient;
using System.Data;

namespace BUS
{
    public class LoaiKhachBUS
    {
        public LoaiKhachDTO[] LayDSLoaiKhach()
        {
            LoaiKhachDTO[] LK = new LoaiKhachDTO[100];
            try
            {
                LoaiKhachDAO LKDao = new LoaiKhachDAO();
                LK = LKDao.LayDSLoaiKhach();
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            return LK;
        }
        public void ThemLoaiKhach(string MaLK, string TenLK, Double HeSo)
        {
            try
            {
                LoaiKhachDAO lkDAO = new LoaiKhachDAO();
                lkDAO.ThemLoaiKhach(MaLK, TenLK, HeSo);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void CapNhatLoaiKhach(LoaiKhachDTO lk)
        {
            try
            {
                LoaiKhachDAO LKDao = new LoaiKhachDAO();
                LKDao.CapNhatLoaiKhach(lk);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
    }
}
